//
//  ViewController.m
//  useDemo
//
//  Created by admin on 2019/12/19.
//  Copyright © 2019 admin. All rights reserved.
//

#import "ViewController.h"
#import <zm_Pay/zmPaySDK.h>

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    UIButton *aliBtn  = [UIButton buttonWithType:UIButtonTypeCustom];
    [aliBtn setTitle:@"ali" forState:0];
    [aliBtn setTitleColor:[UIColor blueColor] forState:0];
    aliBtn.frame = CGRectMake(200, 100, 100, 100);
    [self.view addSubview:aliBtn];
    [aliBtn addTarget:self action:@selector(aliAction) forControlEvents:1<<6];
        
      UIButton *wxBtn  = [UIButton buttonWithType:UIButtonTypeCustom];
      [wxBtn setTitle:@"wx" forState:0];
      [wxBtn setTitleColor:[UIColor blueColor] forState:0];
      wxBtn.frame = CGRectMake(200, 300, 100, 100);
      [self.view addSubview:wxBtn];
      [wxBtn addTarget:self action:@selector(wxAction) forControlEvents:1<<6];

}
- (void)aliAction {
    
        [zmPaySDK startAliPay:@"1" merchantNum:@"G0113357126025" organizationNum:@"G0000046"  encryptionKey:@"ec3b6d2fd260b3eb" orderNum:@"111" response:^(id  _Nonnull response) {
            NSLog(@"%@",response);
        }];

}
- (void)wxAction {
    [zmPaySDK startWXPay:@"1" merchantNum:@"G0113357126025" organizationNum:@"G0000046" miniProID:@"gh_8c8d4ff0e124" encryptionKey:@"ec3b6d2fd260b3eb" orderNum:@"111" wxEnv:WXEnvPreview response:^(id  _Nonnull response) {
                NSLog(@"%@",response);
    }];
}
@end
